﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BDPAutodetect.Simcore
{
    public class DeviceCommandList
    {
        /// <summary>
        /// 设备指令
        /// </summary>
        public List<DeviceCommandData> CommandOptions { get; set; }

        /// <summary>
        /// 构造函数
        /// </summary>
        public DeviceCommandList()
        {
            this.CommandOptions = new List<DeviceCommandData>();
        }

        /// <summary>
        /// 深度克隆
        /// </summary>
        /// <returns></returns>
        public List<DeviceCommandData> CloneDeep()
        {
            if (this.CommandOptions == null) return new List<DeviceCommandData>();
            if (this.CommandOptions.Count <= 0) return this.CommandOptions;
            return this.CommandOptions.Select(v => v.CloneDeep()).ToList();
        }
    }
}
